package com.sitech.ibnms.c3p.mappers;

import com.sitech.ibnms.c3p.domain.C3pIspReport;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Created by liujhc on 7/25.
 */
public interface C3pIspReportMapper {
    void insert(@Param("reports") C3pIspReport... ispReports);

    void insert(@Param("reports") List<C3pIspReport> ispReports);

    @Cacheable("instant")
    List<String> selectReportTemplate(@Param("c3pTaskId") String c3pTaskId, @Param("noticeId") String noticeId);

    @Cacheable("longTerm")
    List<Map> selectIspResult(@Param("unitIds") String[] unitIds, @Param("kpiIds") String[] kpiIds, @Param("execId") int execId);

    /**
     * 查询任务关心的巡检指标
     *
     * @return
     */
    @Cacheable("instant")
    Set<String> queryIspKPIs(@Param("c3pTaskId") String c3pTaskId);

    @Cacheable("longTerm")
    String getKpiNameByKpiId(String kpiId);
}
